package com.kstech.exccheck.creatxml.domain;

import java.io.Serializable;

/**
 * Created by lenovo on 2016/9/6.
 */
public class DataSet implements Serializable{
    /*
     * <!-- 定义检测系统涉及的所有数据集合 --> <DataSet> <!-- 环境变量 --> <!-- 来自于发动机ECU的数据 -->
     * <DSItem Name="档位" DataType="BYTE" Unit="" DecLen="0"/> <!--
     * 来自于检测终端的连接的传感器，需根据安装点来命名 --> <DSItem Name="溢流压力传感器1" DataType="FLOAT"
     * Unit="" DecLen="4"/>
     */
    private String Name = "";
    private String DataType = "";
    private String Unit = "";
    private int Rows;
    private int Declen;
    private int IndexBy;
    private int LinkTo;
    private long values;

    @Override
    public String toString() {
        // TODO Auto-generated method stub
        return Name + " 类型：" + DataType + " 单位：" + Unit + " Rows:" + Rows
                + " Declen:" + Declen + " IndexBy:" + IndexBy + " LinkTo:" + LinkTo
                + " Values:" + Float.intBitsToFloat((int) values);
    }

    public DataSet() {
    }

    public String getDataType() {
        return DataType;
    }

    public DataSet(String DataType) {
        this.DataType = DataType;
    }

    public long getValues() {
        return values;
    }

    public float getFloatValues() {
        return Float.intBitsToFloat((int) values);
    }

    public int getIntValues() {
        return (int) values;
    }

    public void setValues(long values) {
        this.values = values;
    }

    public void setValues(int values) {
        this.values = values;
    }

    public void setValues(float values) {
        this.values = Float.floatToIntBits(values);
    }

    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public String getUnit() {
        return Unit;
    }

    public void setUnit(String unit) {
        Unit = unit;
    }

    public int getDeclen() {
        return Declen;
    }

    public void setDeclen(int declen) {
        Declen = declen;
    }

    public int getRows() {
        return Rows;
    }

    public void setRows(int rows) {
        Rows = rows;
    }

    public int getIndexBy() {
        return IndexBy;
    }

    public void setIndexBy(int indexBy) {
        IndexBy = indexBy;
    }

    public int getLinkTo() {
        return LinkTo;
    }

    public void setLinkTo(int linkTo) {
        LinkTo = linkTo;
    }

}
